{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=71
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i,n,kk:longint;
	a:array[0..10010] of longint;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
for i:=1 to n do 
	read(a[i]);
kk:=n-1;
write(a[n],' ');
for i:=1 to kk do
	write(a[i],' ');
end.